home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / amiga / asrc29k.lha / internet.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-08  |  1.4 KB  |  64 lines

  1. #ifndef    MAXTTL
  2.  
  3. #include "global.h"
  4.  
  5. /* Global structures and constants pertaining to the interface between IP and
  6.  *     higher level protocols
  7.  */
  8.  
  9. /* IP protocol field values */
  10. #define    ICMP_PTCL    1    /* Internet Control Message Protocol */
  11. #define    TCP_PTCL    6    /* Transmission Control Protocol */
  12. #define    UDP_PTCL    17    /* User Datagram Protocol */
  13. #define    RSPF_PTCL    73    /* Radio Shortest Path First Protocol */
  14.  
  15. #define    MAXTTL        255    /* Maximum possible IP time-to-live value */
  16.  
  17. /* DoD-style precedences */
  18. #define    ROUTINE        0x00
  19. #define    PRIORITY    0x20
  20. #define    IMMEDIATE    0x40
  21. #define    FLASH        0x60
  22. #define    FLASH_OVER    0x80
  23. #define    CRITIC        0xa0
  24. #define    INET_CTL    0xc0
  25. #define    NET_CTL        0xe0
  26.  
  27. /* Amateur-style precedences */
  28. #define    AM_ROUTINE    0x00
  29. #define    AM_WELFARE    0x20
  30. #define    AM_PRIORITY    0x40
  31. #define    AM_EMERGENCY    0x60
  32.  
  33. /* Class-of-service bits */
  34. #define    LOW_DELAY    0x10
  35. #define    THROUGHPUT    0x08
  36. #define    RELIABILITY    0x04
  37.  
  38. /* IP TOS fields */
  39. #define    PREC(x)        ((x)>>5 & 7)
  40. #define    DELAY        0x10
  41. #define    THRUPUT        0x8
  42. #define    RELIABLITY    0x4
  43.  
  44. /* Pseudo-header for TCP and UDP checksumming */
  45. struct pseudo_header {
  46.     int32 source;        /* IP source */
  47.     int32 dest;        /* IP destination */
  48.     char protocol;        /* Protocol */
  49.     int16 length;        /* Data field length */
  50. };
  51. #define    NULLHEADER    (struct pseudo_header *)0
  52.  
  53. /* Format of a MIB entry for statistics gathering */
  54. struct mib_entry {
  55.     char *name;
  56.     union {
  57.         int32 integer;
  58.     } value;
  59. };
  60.  
  61. #endif    /* MAXTTL */
  62.  
  63.  
  64.